package com.arcgis.app.dao.api;

import com.arcgis.app.dao.PointInfoDao;
import com.arcgis.app.utils.Urls;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.FileCallback;
import com.lzy.okgo.callback.StringCallback;
import com.lzy.okgo.model.Response;

import java.io.File;

public class MessageService implements MessageAPI {
    @Override
    public void getImgFromServer(String id, FileCallback fileCallback) {

    }

    @Override
    public void savePointInfoToServer(File file, PointInfoDao point, StringCallback callback) {
//        OkGo.<String>post(Urls.URL_Submit)
//                .tag(this)
//                .params("icon", headFile)
//                .params("userPhone",user.getUserPhone())
//                .params("userNickname",user.getUserNickname())
//                .execute(stringCallback)
    }



    @Override
    public void deletePointFromServer(PointInfoDao info, StringCallback callback) {
            OkGo.<String>post(Urls.URL_Delete_Point)
                    .tag(this)
                    .params("id",info.getId())
                    .execute(new StringCallback() {
                        @Override
                        public void onSuccess(Response<String> response) {

                        }
                    });
    }
}
